﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebClient.AwesomeServiceReference;

namespace AspMvcWebClient.Controllers
{
    public class ServiceClient
    {
        private AwesomeClient awesomeServiceClient;

        public ServiceClient()
        {
            awesomeServiceClient = new AwesomeClient();
        }

        public bool CheckPlayer(string name)
        {
            return awesomeServiceClient.CheckPlayer(name);
        }

        public bool SetNamePlayer(string name)
        {
            return awesomeServiceClient.SetNamePlayer(name);
        }

        public List<LGameSession> GetSpelSession (string name)
        {

            return awesomeServiceClient.GetGameSession(name).ToList();
        }

        public List<LPlayer> GetAllSpelare()
        {
            return awesomeServiceClient.GetAllPlayer().ToList();
        }

    }
}